/* 全局css变量 */
@use "sass:math";
//背景图设置
@mixin background($url,$left: left,$top: center,$width: 100%,$height: 100%) {
  background-image: url('~@/components/assets/images/' + $url + '.png');
  background-size: $width $height;
  background-position: $left $top;
  background-repeat: no-repeat;
}

//省略号--单行
@mixin singleEllipsis($maxWidth) {
  width: $maxWidth;
  max-width: $maxWidth;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  box-sizing: border-box;
}

//省略号--多行
@mixin multiLineEllipsis($maxWidth){
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $maxWidth;
  -webkit-box-orient: vertical;
}

// 不使用加粗--字体显示显示稍粗
@mixin fontWeight(){
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

//placeholder样式修改设置
@mixin setPlaceholder($color: #bfbfbf, $fontSize: 14px) {
  input:-ms-input-placeholder {
    color: $color !important;
    font-size: $fontSize;
  }

  input::-webkit-input-placeholder {
    color: $color !important;
    font-size: $fontSize;
  }

  input::-moz-placeholder {
    color: $color !important;
    font-size: $fontSize;
  }

  input:-moz-placeholder {
    color: $color !important;
    font-size: $fontSize;
  }
}

@function pxTOvw($val,$dev) {
  $base-width: $dev;
  $screen-width: var(--screen-width);
  @return calc($val * 100vw * $base-width / $screen-width);
}